//
//  FavouriteViewController.m
//  WuliHanhan
//
//  Created by chen tang on 16/2/26.
//  Copyright © 2016年 LVpeng. All rights reserved.
//

#import "FavouriteViewController.h"
#import "Header.h"

@interface FavouriteViewController ()<UITableViewDataSource, UITableViewDelegate, UIScrollViewDelegate>

@property (nonatomic, strong) UITableView *mainTableView;
@property (nonatomic, strong) NSMutableArray *mutableArray;





@end

@implementation FavouriteViewController


- (void)loadView
{
    [super loadView];
    [self.view setBackgroundColor:[UIColor whiteColor]];
//    self.title = @"关注";
    [self.navigationController setNavigationBarHidden:YES];

    
    UIRefreshControl *refresh = [[UIRefreshControl alloc] initWithFrame:CGRectMake(0, 0, 320, 200)];
    [refresh addTarget:self action:@selector(bega) forControlEvents:UIControlEventValueChanged];
    
    _mainTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, heightView)];
    [self.view addSubview:_mainTableView];
}



- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [_mainTableView setDataSource:self];
    [_mainTableView setDelegate:self];
    [_mainTableView setTableHeaderView:[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 200)]];
//    [_mainTableView setContentOffset:CGPointMake(0, 200)];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)bega
{
    NSLog(@"222222222222");
}

#pragma mark     --------    dataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 10;
}



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *cellInden = @"cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellInden];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellInden];
    }
    
    return cell;
}




//滚动
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
//    NSLog(@"%f", _mainTableView.contentOffset.y);
    
//    float k = _mainTableView.contentOffset.y；
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
